<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
	$(function() {
		$('#toolbar').toolbar({buttons:[
			{name:'save',iconCls:'icon-save',text:'保存'}
	  	],handler:handler});
	});
	function handler() {
		switch(this.name) {
			case 'save': toSave();break;
		}
	}
	function toSave(){
		$.messager.progress({title:'系统提示',text:'数据处理中，请耐心等待...'});
		$.submit('#dataform',function(r) {
			$.messager.progress('close');
			if(r.code<0) return $alert(r.msg);
			top.$prompt('保存成功');
			top.$window.close(window,1,{data:r.data});
		});
	}
</script>
</head>
<body>
	<div id="toolbar" class="toolbar" ></div>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'center',border:false">
			<form id="dataform" action="update.do" method="post">
				<input type="hidden" value="${item.id }" name="entity.id"/>
				<table class="form-tbl">
					<tr class="form-tr">
						<th class="form-th">登录帐号：</th>
						<td class="form-td required">
							<input type="text" id="account" value="${item.username }" name="entity.username" class="easyui-validatebox form-text" style="width:170px;" data-options="required:true" onblur="checkAccount()"/>
							<span class="form-memo" id="passwordMemo">默认密码：12345</span>
						</td>
					</tr>
					<tr class="form-tr">
						<th class="form-th">姓　　名：</th>
						<td class="form-td required">
							<input type="text" name="entity.nickname" value="${item.nickname }" class="easyui-validatebox form-text" style="width:170px;" data-options="required:true" />
						</td>
					</tr>
					
					<tr class="form-tr">
						<th class="form-th">状　　态：</th>
						<td class="form-td required">
							<div id="valid"></div>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</body>
</html>